<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%--
  Created by IntelliJ IDEA.
  User: zhaoyingjie
  Date: 2021/9/24
  Time: 19:33
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<html>
<head>
    <title>公司详情</title>
    <link rel="icon" href="/hire/imgs/favicon.ico" type="image/x-icon"/>
    <link rel="stylesheet" href="/hire/css/job/company/company_info.css">
    <link rel="stylesheet" href="/hire/plugins/bootstrap/css/bootstrap.css">
</head>
<body class="page-white">
<%@include file="./../../common/mynav.jsp" %>
<div id="wrap">
    <div id="main" class="company-new">
        <div class="company-banner">
            <div class="inner home-inner">
                <input type="hidden" value="${company.id}" id="dem2">
                <div>
                    <div class="info-primary">
                        <img src="/hire/imgs/company/logo/${company.logo}" width="103px" height="103px">
                        <div class="info">
                            <h1 class="name">${company.name}</h1>
                            <p>
                                ${company.financing}
                                <em class="dolt"></em>
                                ${company.num}
                                <em class="dolt"></em>
                                ${company.industryType}
                            </p>
                        </div>
                    </div>
                    <div class="company-stat">
                        <span>
                            <b>${count}</b>
                            在招职位
                        </span>
                        <em class="vline"></em>
                        <span>
                            <b>${r1}</b>
                            位Boss
                        </span>
                        <em class="vline"></em>
                        <div class="op">
                            <ul>
<%--                                <li><a href="/hire/resume/resume_make"><img src="../../imgs/icon-resume.png">填写在线简历</a>--%>
                                </li>
                                <li><a href="/hire/resume/resume_upload"><img
                                        src="../../imgs/icon-upload.png">上传附件简历</a></li>
                            </ul>
                        </div>
                    </div>
                    <div class="company-tab">
                        <a href="#">公司简介</a>
                    </div>
                </div>
            </div>
        </div>
        <div class="job-box">
            <div class="inner home inner">
                <div class="job-detail">
                    <div class="detail-content">
                        <div class="job-sec">
                            <h3>公司简介</h3>
                            <img src="../../imgs/line-sec.png" alt="">
                            <div class="text fold-text">
                                公司简介<br>
                                <span>${company.introduction}</span>
                            </div>
                            <h3>工商信息</h3>
                            <img src="../../imgs/line-sec.png" alt="">
                            <div class="text fold-text">
                                ${company.businessName}<br>
                                <div class="buss-b">
                                    <ul>
                                        <li><span>法定代表人:</span>&nbsp;${company.representative}</li>
                                        <li><span>注册资本:</span> ${company.registeredAmount}</li>
                                        <li><span>成立日期:</span> <fmt:formatDate value="${company.establishedTime}" pattern="yyyy-MM-dd"/></li>
                                        <li><span>企业简介:</span> ${company.introduction}</li>
                                    </ul>
                                </div>
                            </div>
                            <h3>公司地址</h3>
                            <input type="hidden" id="addr" value="${company.province}${company.city}${company.district}${company.area}">

                            <img src="../../imgs/line-sec.png" alt="">
                            <div class="job-location">
                                <div class="address">${company.area}</div>
                                <div class="job-location-map">
                                    <div id="address">

                                    </div>
<%--                                    <img src="../../imgs/place.jpg" alt="">--%>
                                </div>
                            </div>
                            <h3 class="t1">在招职位</h3>
                            <img src="../../imgs/line-sec.png" alt="">
                            <div class="title" id="dem1">

                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>

<%@include file="./../../common/myfooter.jsp" %>
<script src="/hire/js/common/page1.js"></script>
<script src="/hire/plugins/jquery/jquery.min.js"></script>
<script src="/hire/plugins/bootstrap/js/bootstrap.js"></script>
<script src="/hire/js/common/page2.js"></script>
<script src="/hire/js/job/company/companyPage.js"></script>
<script src="//api.map.baidu.com/api?type=webgl&v=3.0&ak=YdcyBdAMy2CPVhN4Eo0E4falnPff1Pna"></script>
<script>

    $(function () {
        let companyId = $("#dem2").val();
        $("#dem1").load("/hire/job/company/companyPage", {id: companyId})

        // console.log($("#addr").val())

        let addressReal = document.getElementById("addr").value;
        var map = new BMapGL.Map('address');
        map.centerAndZoom(new BMapGL.Point(116.331398,39.897445), 18);
        map.enableScrollWheelZoom(true);
        //创建地址解析器实例
        var myGeo = new BMapGL.Geocoder();
        // 将地址解析结果显示在地图上，并调整地图视野
        console.log(addressReal)
        myGeo.getPoint(addressReal, function(point){
            if(point){
                map.centerAndZoom(point, 18);
                map.addOverlay(new BMapGL.Marker(point, {title: addressReal}))
            }else{
                alert('您选择的地址没有解析到结果！');
            }
        }, '苏州市')
    })

</script>
</body>
</html>
